package org.javaboy.remember_me_demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    /**
     * 无论 RM 登录还是 用户名密码登录，只要登录了就能访问
     * @return
     */
    @GetMapping("/hello")
    public String hello() {
        return "hello";
    }

    /**
     * 只有 RM 登录才能访问
     * @return
     */
    @GetMapping("/rm")
    public String rm() {
        return "hello rm";
    }

    /**
     * 必须用户名密码登录
     * @return
     */
    @GetMapping("/fullAuth")
    public String fullAuth() {
        return "hello fullAuth";
    }
}
